<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>登录</title>

    <link rel="shortcut icon" type="image/x-icon" href={{ url_for("static", filename="favicon.ico", _external=True) }}>
    <link rel="icon" type="image/x-icon" href={{ url_for("static", filename="favicon.ico", _external=True) }}>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link rel="stylesheet" href={{ url_for("static", filename="css/bootstrap.min.css", _external=True) }}>
    <!-- Font Awesome -->
    <link rel="stylesheet"
          href={{ url_for("static", filename="fonts/font-awesome-4.7.0/css/font-awesome.min.css", _external=True) }}>
    <!-- Theme style -->
    <link rel="stylesheet" href={{ url_for("static", filename="css/bootstrap-theme.min.css", _external=True) }}>

    <link rel="stylesheet" href="{{ url_for("static",filename="css/login.css") }}"/>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body>
<div id="particles"></div>
<!-- Login Box -->
<div class="skin-blue">
    <div class="login-box">
        <!-- login-logo -->
        <div class="login-logo">
            <a href="{{ url_for('blue_duty.index') }}"><b>运维日报</b></a>
        </div>
        <!-- . login-logo -->

        <!-- login-box-body -->
        <div class="login-box-body">
            <form action="{{ url_for("blue_auth.login", _external=True) }}" method="post">
                {{ form.hidden_tag() }}
                <div class="form-group {% if form.uname.errors %}has-error{% endif %}">
                    <div class="input-group">
                        <div class="input-group-addon">
                            <i class="fa fa-user"></i>
                        </div>
                        {{ form.uname(class="form-control",placeholder="用户名") }}
                    </div>
                    {% if form.uname.errors %}
                        {% for e in form.uname.errors %}
                            <p class="help-block">{{ e }}</p>
                        {% endfor %}
                    {% endif %}
                </div>
                <div class="form-group {% if form.pwd.errors %}has-error{% endif %}">
                    <div class="input-group">
                        <div class="input-group-addon">
                            <i class="fa fa-lock"></i>
                        </div>
                        {{ form.pwd(class="form-control", placeholder="密码") }}
                    </div>
                    {% if form.pwd.errors %}
                        {% for e in form.pwd.errors %}
                            <p class="help-block">{{ e }}</p>
                        {% endfor %}
                    {% endif %}
                </div>
                <div class='form-group'>
                    <div class='row'>
                        <div class='col-xs-8'>
                            <div class="login-box-msg">
                                {% set messages = get_flashed_messages() %}
                                {% if messages %}
                                    {% for mes in messages %}
                                        <p class="text-red">{{ mes }}</p>
                                    {% endfor %}
                                {% endif %}
                            </div>
                        </div>
                        <div class='col-xs-4'>
                            {{ form.btn_login(class="form-control btn btn-primary btn-block btn-flat") }}
                            <input type="hidden" name="next" value={{ url_next|default('') }}>
                        </div>

                    </div>
                </div>
            </form>
        </div>
        <!-- . login-box-body -->
    </div>
</div>

<!-- . login-box -->

<!-- jQuery 2.2.3 -->
<script src={{ url_for("static", filename="js/jquery.min.js", _external=True) }}></script>
<!-- Bootstrap 3.3.6 -->
<script src={{ url_for("static", filename="js/bootstrap.min.js", _external=True) }}></script>
<script src={{ url_for('static',filename='js/login.js') }}></script>
</body>
</html>